<#include "/common/head.ftl">

<@showTitle title="${i18n.getMessage('student')} > ${i18n.getMessage('changeOffering')}">
	<a href="#" onclick="cc('offering/showInfoOffering.sgt?id=${offering.id}')">${i18n.getMessage('offering')}</a>
</@showTitle>

<div id="error" style="display:none"></div>

<form action="study/changeOffering.sgt" validator="study/validateChangeOffering.sgt" onsubmit="submitFormValidation(this); return false;" onreset="$('error').hide()">
	<input type="hidden" name="offeringId" value="${offering.id}"/>
	
	<table id="dataTable" cellspacing="5" cellpadding="0" align="center">
		<tr>
			<td class="name">${i18n.getMessage('sourceOffering')}: </td>
			<td>${(offering.name)!}, from ${(offering.startDate?date)!} to ${(offering.endDate?date)!}</td> 
		</tr>
		<tr>
			<td class="name">${i18n.getMessage('targetOffering')}:</td>
			<td>
				<select name="targetOfferingId" style="width:205px">
					<option></option>
					<#list offering.level.offerings as each>
						<#if (each != offering)>
							<option value="${each.id}">${(each.startDate?date)!}-${(each.endDate?date)!} # ${(each.name)!}</option>
						</#if>
					</#list>
				</select>
			</td> 
		</tr>
		<tr>
			<td class="name">${i18n.getMessage('options')}: </td>
			<td><input type="checkbox" name="sourceOfferingDeleted" value="true"/> Delete the source class after moving</td> 
		</tr>
		<tr>
			<td class="name"></td>
			<td>
				<input type="submit" value="${i18n.getMessage('move')}" class="button_style"/>
				<input type="reset" value="${i18n.getMessage('reset')}" class="button_style"/>
			</td> 
		</tr>
	</table>
</form>
